﻿namespace Decorator
{
    internal class SideBorder : Border
    {
        private readonly char borderChar;
        public SideBorder(Display display, char borderChar) : base(display)
        {
            this.borderChar = borderChar;
        }

        public override int GetColumns()
        {
            return 1 + this.display.GetColumns() + 1;
        }

        public override int GetRows()
        {
            return this.display.GetRows();
        }

        public override string GetRowText(int row)
        {
            return $"{this.borderChar}{this.display.GetRowText(row)}{this.borderChar}";
        }
    }
}
